package com.yami.shop.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.RefundInfo;
import com.yami.shop.bean.param.CustomerReqParam;
import com.yami.shop.bean.pay.RefundInfoDto;
import com.yami.shop.bean.vo.AccountDetailVO;
import com.yami.shop.bean.vo.ShopAccountDetailVO;
import com.yami.shop.bean.vo.ShopAccountVO;
import com.yami.shop.common.util.PageParam;

import java.util.Date;
import java.util.List;

/**
 * 退款信息
 *
 * @author Citrus
 * @date 2022-05-25 15:45:45
 */
public interface RefundInfoService extends IService<RefundInfo> {
    /**
     * 执行退款
     * @param refundInfoDto 退款信息
     * @return 是否成功
     */
    Boolean doRefund(RefundInfoDto refundInfoDto);

    /**
     * 退款成功操作
     * @param refundInfo 退款信息
     */
    void refundSuccess(RefundInfo refundInfo);

    /**
     * 根据时间参数获取退款账户详情
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @param shopName 店铺名称
     * @return 退款账户详情
     */
    AccountDetailVO getRefundAccountDetail(Date startTime, Date endTime, String shopName);

    /**
     * 获取平台退款账户详情
     * @param startTime
     * @param endTime
     * @return
     */
    AccountDetailVO getPlatformRefundAccountDetail(Date startTime, Date endTime);


    /**
     * 获取返回信息
     * @param accountDetailVO
     * @return
     */
    AccountDetailVO getAccountDetailVO(AccountDetailVO accountDetailVO);

    /**
     * 根据时间参数分页获取退款账户详情
     * @param page
     * @param accountSearchDTO
     * @return
     */
    IPage<ShopAccountVO> listRefundAccountDetail(PageParam<ShopAccountVO> page, CustomerReqParam accountSearchDTO);

    /**
     * 根据参数分页获取退款账户详情
     * @param page
     * @param customerReqParam
     * @return
     */
    IPage<ShopAccountDetailVO> pageShopRefundAccountDetail(PageParam<ShopAccountDetailVO> page, CustomerReqParam customerReqParam);

    /**
     * 根据参数获取退款详情列表
     * @param customerReqParam
     * @return
     */
    List<ShopAccountDetailVO> listRefundAccountDetail(CustomerReqParam customerReqParam);
}
